www.gusucode.com > XerCMS 携云PHP企业建站程序 v2015PHP源码程序 > XerCMS 携云PHP企业建站程序 v2015/XerCMS_v20150724/XerCMS_v20150724/XerCMS/Utils/tables/XerCMS_log.php

    <?php
/**
 * @name     XERCMS
 * @author   Arno <XerCMS@163.com> [QQ:1328013]
 * @version  1.0.0
 * @link     http://www.XerCMS.com
 */

!defined('XERCMS') && exit('Access Denied');

class TABLE_log extends resource
{
     private $data = NULL;
     private $defaultTable = 'xercms_funds_record';
	 
	function __construct() {
	 	$this->table = $this->defaultTable;
	} 
 
     function read($page,$number = 30,$uid = 0) {	     
		$uid = empty($uid) ? X::$G['uid'] : $uid;
		return DB::fetch_all('SELECT l.*,c.name,d.data,d.note from xercms_funds_record l 
               left join xercms_consume_class c on c.id = l.class 
               left join xercms_funds_detail d on d.idstr = l.idstr
               WHERE l.uid = '.X::$G['uid'].' limit '.(($page-1)*$number).','.$number);
	}

	function count($uid = 0) {	     
		$uid = empty($uid) ? X::$G['uid'] : $uid;
	     return DB::result_first('SELECT count(*) FROM xercms_funds_record WHERE uid = '.X::$G['uid']);
	}
}
?>